﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace WebCore
{
    public class Settings
    {

        public const int Post = 1;
        public const int News = 2;
        public const int WebPage = 3;
        

        // paging setting
        public static readonly int PageSize = int.Parse(ConfigurationManager.AppSettings["PageSize"]);

        public static readonly int EventPageSize = 5;


        // Rss setting
        public static readonly string RssNewsTitle = ConfigurationManager.AppSettings["RssNewsTitle"];
        public static readonly string RssBlogTitle = ConfigurationManager.AppSettings["RssBlogTitle"];
        public static readonly string RssNewsDescription = ConfigurationManager.AppSettings["RssNewsDescription"];
        public static readonly string RssBlogDescription = ConfigurationManager.AppSettings["RssBlogDescription"];
        public static readonly int NumberOfRssItems = int.Parse(ConfigurationManager.AppSettings["NumberOfRssItems"]);

       
        //UserImage 
        public static readonly string UserImagePath = "~/content/images/users/cropped/";
        public static readonly string UserImageTempPath = "~/content/images/temp/";
        public static readonly string UserTempImageNamePattern = "_temp";


        // WebImage 
        public static readonly string WebImagePath = "~/content/images/web/";


        #region Cache Setting
        public static readonly bool CacheEnabled =  bool.Parse(ConfigurationManager.AppSettings["CacheEnabled"]);

        //RSS
        public const string Cache_RSS__Key = "web.rss.{0}";

     
        // user
        public const string Cache_User_OpenID_Key = "web.user.openid.{0}";      // for base controller
        public const string Cache_User_ID_Key = "web.user.id.{0}";  // for view user details


        // event
        public const string Cache_Event_By_ID_Key = "web.event.id.{0}";
        public const string Cache_Event_By_Page_Key = "web.event.page.{0}";
        public const string Cache_Event_Pattern_Key = "web.event.";


        #endregion


   
    }
}
